home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
TIFF_WIN
/
ADJUST_S.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-31
|
993b
|
30 lines
#include "my color.h"
void adjust_scroll_bars(whichWindow) /* this routine is called from the "do mouse" routine.
Here I will re-size and move the scroll bars
if the user has "grown" the window */
CWindowPtr whichWindow;
{
ControlHandle control;
control = ((CWindowPeek)whichWindow)->controlList;
while(control)
{
if((*control)->contrlRfCon == HORIZONTAL_SCROLL)
{
MoveControl(control, (*control)->contrlOwner->portRect.left - ONE_PIXEL,
(*control)->contrlOwner->portRect.bottom - BAR_WIDTH + ONE_PIXEL);
SizeControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + 2,
BAR_WIDTH);
}
else if((*control)->contrlRfCon == VERTICLE_SCROLL)
{
MoveControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + ONE_PIXEL,
(*control)->contrlOwner->portRect.top - ONE_PIXEL);
SizeControl(control, BAR_WIDTH,
(*control)->contrlOwner->portRect.bottom - BAR_WIDTH + 2);
}
control = (*control)->nextControl;
}
}